home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- InitLibraryman()
- end
-
- on settempcounter
- global BookTempCounter
- set BookTempCounter to 0
- end
-
- on checktempcounter
- global BookTempCounter
- set BookTempCounter to BookTempCounter + 1
- if BookTempCounter > 100 then
- GoMenu()
- end if
- end
-
- on stopMovie
- global LibraryMan
- set LibraryMan to 0
- end
-
- on InitLibraryman
- global LibraryMan
- set LibraryMan to birth(script "LibraryMan.script")
- end
-
- on initnode a, b, c, d, e, f
- global navbrain, LocQT, LocDB
- SolveLQT(a)
- navbrain(initnode, a, b, c, d, e, f)
- end
-
- on KeyNav x
- global navbrain
- if (x = 123) or (x = 0) then
- navbrain(NavNow, "L", 0)
- else
- if (x = 124) or (x = 2) then
- navbrain(NavNow, "R", 0)
- else
- if (x = 126) or (x = 13) then
- navbrain(NavNow, "F", 0)
- else
- if (x = 125) or (x = 1) then
- navbrain(NavNow, "B", 0)
- end if
- end if
- end if
- end if
- end
-
- on SolveLQT node
- global LocQT, LocPref
- set LocPref to "TwrBedRm"
- set LocQT to "TwrBedRm.MOV"
- end
-
- on installLocDB
- global LocQT, LocPref, dbBG, NSnBG, dbMID, NSnMID, dbFORE, NSnFORE, dbAUD, NSnAUD, dbMUS, NSnMUS
- if "TwrBedRm" contains LocPref then
- jamBG(LocPref)
- end if
- end
-
- on jamBG rec
- global dbBG, NSnBG
- if dbBG contains rec then
- exit
- else
- put "," & rec after dbBG
- set NSnBG to the number of items in dbBG
- end if
- end
-
- on jamMID rec
- global dbMID, NSnMID
- if dbMID contains rec then
- exit
- else
- put "," & rec after dbMID
- set NSnMID to the number of items in dbMID
- end if
- end
-
- on jamFORE rec
- global dbFORE, NSnFORE
- if dbFORE contains rec then
- exit
- else
- put "," & rec after dbFORE
- set NSnFORE to the number of items in dbFORE
- end if
- end
-
- on jamAUD rec
- global dbAUD, NSnAUD
- if dbAUD contains rec then
- exit
- else
- put "," & rec after dbAUD
- set NSnAUD to the number of items in dbAUD
- end if
- end
-
- on jamMUS rec
- global dbMUS, NSnMUS
- if dbMUS contains rec then
- exit
- else
- put "," & rec after dbMUS
- set NSnMUS to the number of items in dbMUS
- end if
- end
-
- on BookIt
- global NowBOOK, turnbrain
- turnbrain(Event, 1)
- go(1, NowBOOK)
- end
-
- on BKIT x
- global NowBOOK
- set NowBOOK to x
- go(x)
- end
-
- on LowBookNpull
- set x to the mouseH
- if x < 118 then
- BKIT("beHaight")
- exit
- end if
- if x < 133 then
- BKIT("beFFace2")
- exit
- end if
- if x < 149 then
- BKIT("beArtGHM")
- exit
- end if
- if x < 165 then
- BKIT("beFavChd")
- exit
- end if
- if x < 178 then
- BKIT("beZooPuz1")
- exit
- end if
- if x < 190 then
- BKIT("beZooPuz2")
- exit
- end if
- if x < 201 then
- BKIT("beZooPuz3")
- exit
- end if
- if x < 217 then
- BKIT("beZooPuz4")
- exit
- end if
- if x < 230 then
- BKIT("beLBN09")
- exit
- end if
- if x < 245 then
- BKIT("beLBN10")
- exit
- end if
- if x < 257 then
- BKIT("beLBN11")
- exit
- end if
- if x < 271 then
- BKIT("beLBN12")
- exit
- end if
- if x < 285 then
- BKIT("beLBN13")
- exit
- end if
- if x < 298 then
- BKIT("beLBN14")
- exit
- end if
- if x < 312 then
- BKIT("beLBN15")
- exit
- end if
- if x < 323 then
- BKIT("beLBN16")
- exit
- end if
- if x < 336 then
- BKIT("beLBN17")
- exit
- end if
- if x < 348 then
- BKIT("beLBN18")
- exit
- end if
- if x < 365 then
- BKIT("beLBN19")
- exit
- end if
- if x < 379 then
- BKIT("beLBN20")
- exit
- end if
- if x < 392 then
- BKIT("beLBN21")
- exit
- end if
- end
-
- on TopBookNpull
- global NowBOOK
- set x to the mouseH
- if x < 150 then
- BKIT("beTDTips")
- exit
- end if
- if x < 166 then
- BKIT("beFFace1")
- exit
- end if
- if x < 181 then
- BKIT("beSFists")
- exit
- end if
- if x < 195 then
- BKIT("beBeatnk")
- exit
- end if
- if x < 210 then
- BKIT("bePuzzl1")
- exit
- end if
- if x < 221 then
- BKIT("beHStar")
- exit
- end if
- if x < 234 then
- BKIT("beGROOVI")
- exit
- end if
- if x < 247 then
- BKIT("beEngRM")
- exit
- end if
- if x < 260 then
- BKIT("beSmashn")
- exit
- end if
- if x < 274 then
- BKIT("beVidDrv")
- exit
- end if
- if x < 289 then
- BKIT("beFoodBr")
- exit
- end if
- if x < 305 then
- BKIT("beFoodG")
- exit
- end if
- if x < 317 then
- BKIT("beDrink")
- exit
- end if
- if x < 332 then
- BKIT("beTDVS")
- exit
- end if
- if x < 342 then
- BKIT("beStatMon")
- exit
- end if
- if x < 356 then
- BKIT("beRadio")
- exit
- end if
- if x < 369 then
- BKIT("beVidFon")
- exit
- end if
- end
-
- on WestBookPull
- set x to the mouseH
- if x < 176 then
- BKIT("bePsyMap")
- exit
- end if
- if x < 191 then
- BKIT("beESPman")
- exit
- end if
- if x < 206 then
- BKIT("beLBW03")
- exit
- end if
- if x < 220 then
- BKIT("beLBW04")
- exit
- end if
- if x < 235 then
- BKIT("beLBW05")
- exit
- end if
- if x < 247 then
- BKIT("beLBW06")
- exit
- end if
- if x < 259 then
- BKIT("beLBW07")
- exit
- end if
- if x < 272 then
- BKIT("beLBW08")
- exit
- end if
- if x < 284 then
- BKIT("beLBW09")
- exit
- end if
- if x < 300 then
- BKIT("beLBW10")
- exit
- end if
- if x < 313 then
- BKIT("beLBW11")
- exit
- end if
- if x < 327 then
- BKIT("beLBW12")
- exit
- else
- BKIT("beLBW13")
- end if
- end
-
- on gosleep x
- global SleepRec, navbrain
- navbrain(TagSPlace)
- if SleepRec = EMPTY then
- set SleepRec to "1," & x
- else
- put x into item 2 of SleepRec
- end if
- go("Rest." & x)
- end
-
- on Wakeup
- global SleepRec, navbrain, SPlace
- navbrain(jump, SPlace)
- end
-
- on trysleep
- global UMental
- set randseed to random(10)
- if UMental > 90 then
- set SleepGo to "noSleep"
- else
- if (UMental > 69) and (randseed > 6) then
- set SleepGo to "noSleep"
- else
- if (UMental > 50) and (randseed > 8) then
- set SleepGo to "noSleep"
- else
- set SleepGo to "Sleep"
- end if
- end if
- end if
- go(SleepGo)
- end
-
- on SleepAction
- global turnbrain, UMental
- turnbrain(setMuteChek, "mental")
- turnbrain(setMuteAct, "all")
- set n to random(7) + 6
- turnbrain(Event, n)
- turnbrain(resetcheks)
- Dream()
- end
-
- on Dream
- go(1, "bdDREAMA")
- end
-
- on CBallVision
- global TwrPwr
- set TwrPwr to TwrPwr - 1
- go("CBallVision." & random(6))
- end
-
- on Indhelp
- global tframe
- set tframe to the frame
- go("IndHelp")
- end
-
- on pageturn a
- puppetSound("BookPage.1")
- go("Index." & a)
- end
-